UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1J6/a6B8+r0ytIC9Mweg7tSPeKJ6MIbhJuwknWyOrpY=' 
WHERE 
  key_id = 'b75160bc405312b1e1733a0bffe5e586001d3f22d8368d1d86f0c3a77d83610b' 
  AND (
    token = '1J6/a6B8+r0ytIC9Mweg7tSPeKJ6MIbhJuwknWyOrpY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036