UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ojydLfVEI5FlfUaVXDkfE7hL5svnqVhQ+YAaM4Zpywo=' 
WHERE 
  key_id = '13ffecbaff548339b8ab284676be22472fb182d97ca214cf5f1ed3edf96c215d' 
  AND (
    token = 'ojydLfVEI5FlfUaVXDkfE7hL5svnqVhQ+YAaM4Zpywo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041