UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zcXFesCqcfpmB3Q+G35xOrznl5/MJzH0H3bI/gv5yU8=' 
WHERE 
  key_id = '3b773a584a4c6d9cc7ef1de63c7b5c61ff8883b6127e2d0e88aa17138ee9f333' 
  AND (
    token = 'zcXFesCqcfpmB3Q+G35xOrznl5/MJzH0H3bI/gv5yU8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031