UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IYqR6C0Jyyv5idL/VWQYDqeliUqWon1JmyF3MJmuEKU=' 
WHERE 
  key_id = '09042cbcf883dfece27abf89b0a82e7d6b81ea60787544030e4a1d2e82cce417' 
  AND (
    token = 'IYqR6C0Jyyv5idL/VWQYDqeliUqWon1JmyF3MJmuEKU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020