UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8hwQ/O+eqJ2Oj2eG5WgDzJiV1NozqEa2Jaui7Ex1KEk=' 
WHERE 
  key_id = '837eddcee0501d51eb3710d097e45c6fc9b450923df0cd41650fa43589ec3e8a' 
  AND (
    token = '8hwQ/O+eqJ2Oj2eG5WgDzJiV1NozqEa2Jaui7Ex1KEk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041