UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EljQTvjM8hizYNjl9cH5FRWBjHcGJdH2SQPd0wEXrdc=' 
WHERE 
  key_id = '5fba32d3305e93ad3e4eff6333e4748b9790b1c6cd5ecc28e86c8d3ce7403e31' 
  AND (
    token = 'EljQTvjM8hizYNjl9cH5FRWBjHcGJdH2SQPd0wEXrdc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031