UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yD2TH5PLpdPrHf+4VNaXce2tlR1+QHAyvCXBTGwZgr0=' 
WHERE 
  key_id = '4750380d23a3e73a7cdd1c79d213a9709c561b19db7c1a2d5ba4edb8b6824c8c' 
  AND (
    token = 'yD2TH5PLpdPrHf+4VNaXce2tlR1+QHAyvCXBTGwZgr0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034