UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e+XjIsvfxKO+CGkJK7Yuoobnf8oUcIApWaNVGkIhyWE=' 
WHERE 
  key_id = '9660e8bcf343c70acdf1a5dc1b5634740e4cef143a8c3b3a0ce45d9d7ee55709' 
  AND (
    token = 'e+XjIsvfxKO+CGkJK7Yuoobnf8oUcIApWaNVGkIhyWE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032