UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Lj0KYiV4GIxBk8v/7wcuvznCFIjvRAPMi/fLmaQlqvw=' 
WHERE 
  key_id = '1bb1149886de61bd2c3152d17a99ea0eb92721cea3bbd4ef311033d1ffed35ee' 
  AND (
    token = 'Lj0KYiV4GIxBk8v/7wcuvznCFIjvRAPMi/fLmaQlqvw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034