UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7DR75k/A1ieYB0X8IYBYDPZNcdXHDf/qcMGMvpfzsEc=' 
WHERE 
  key_id = '1beb67c89fbbec16a4ff61587c7dbcd0b3a5783855e9303d8f76f05da790ebe6' 
  AND (
    token = '7DR75k/A1ieYB0X8IYBYDPZNcdXHDf/qcMGMvpfzsEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029