UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'E3bLPSFvw2oSi4u5fq/SU8okfAGgqrBnSC7zxdGKW+Q=' 
WHERE 
  key_id = '55326a3fc81fc005ee17edef4864f413ddd3fb28c4c7d95f741369271953ea79' 
  AND (
    token = 'E3bLPSFvw2oSi4u5fq/SU8okfAGgqrBnSC7zxdGKW+Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049