UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0VVEf2lEkIGaAfPX7x12O06/4IWDvRvR9fR/1IK8/xA=' 
WHERE 
  key_id = '03a816a28752d6bf549b8387319accd63adc359edfabc64983154f362699a79e' 
  AND (
    token = '0VVEf2lEkIGaAfPX7x12O06/4IWDvRvR9fR/1IK8/xA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041