UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1lrDUEX0B8vZqGj9yGp8yufGwAyLU8dk6htblBLZE+U=' 
WHERE 
  key_id = '636af99dbdd88b9ca2853acc81dd82b4962722fac2ce5a5329d31f7b7c6af6c9' 
  AND (
    token = '1lrDUEX0B8vZqGj9yGp8yufGwAyLU8dk6htblBLZE+U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033