UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/zmkVJ440eFGivTBJertxrjwnNMeSxnq9TU9wF+hlJ4=' 
WHERE 
  key_id = 'c80013004b5371b303fc2baad98823ed8cb3cabd9d7f1fd4dd05078a0af60693' 
  AND (
    token = '/zmkVJ440eFGivTBJertxrjwnNMeSxnq9TU9wF+hlJ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051