UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iAe3HWcItwpvQbDMPPBZWgvYgLuu+qNRxVdQ6wJEs5M=' 
WHERE 
  key_id = '955dcdf61a2e30db6c4ee2d44d25f710145098ba0f1330961d61d0cfb290b5ce' 
  AND (
    token = 'iAe3HWcItwpvQbDMPPBZWgvYgLuu+qNRxVdQ6wJEs5M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029