UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+d0DEK8kpj4JpfwcN83ZMI3j8/qToZidm0D6BYnHqaA=' 
WHERE 
  key_id = 'ebbaee5f03ea1bde361ecd3060e3a1cf825e9ddbe7fcf53c40db7d514e6e9c88' 
  AND (
    token = '+d0DEK8kpj4JpfwcN83ZMI3j8/qToZidm0D6BYnHqaA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036