UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uif5oGUJgRQhLekVPk7qNLFgHIzzdhi1/CfsFu7HrUw=' 
WHERE 
  key_id = '71a5e1eb147bcf77601c27bd7e0b54b9d05688d3e704ae882f575b1fb703da59' 
  AND (
    token = 'uif5oGUJgRQhLekVPk7qNLFgHIzzdhi1/CfsFu7HrUw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043