UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lMgC/fZLVky7QD/joqBkA9K1e/QgbwrDMosle/qIIAw=' 
WHERE 
  key_id = '4c842acef48b080539c1c87c72ae90382bc822d9822ca6aaabe8ecb53880b38f' 
  AND (
    token = 'lMgC/fZLVky7QD/joqBkA9K1e/QgbwrDMosle/qIIAw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020