UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '73kO5Kand7zQFvzyWvV6vl/x4F3SoRBfxytnGCdhppg=' 
WHERE 
  key_id = '4f86e45706dadc8d8d0be0596a0b57e7d5d57e60ef9ee597330f9af59ea51cc2' 
  AND (
    token = '73kO5Kand7zQFvzyWvV6vl/x4F3SoRBfxytnGCdhppg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051