UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/bBuU171GtPFcWiB2xVpCtmZNHnV6N5kLG2HfZrWAIE=' 
WHERE 
  key_id = '63a793c8b93da6f5e8159491ec5f2c1829f2e2d37d5a6d1e25e2ad11c0f28409' 
  AND (
    token = '/bBuU171GtPFcWiB2xVpCtmZNHnV6N5kLG2HfZrWAIE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020