UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/P2ODow/iVqC1CnUtAxKl3oLnUg0IYuO7dojIJAHTgQ=' 
WHERE 
  key_id = 'b6a0c68ac41f950367e75fdf10fe61e8ac3a0b8700aa8e7371606ca2f7b7c8e0' 
  AND (
    token = '/P2ODow/iVqC1CnUtAxKl3oLnUg0IYuO7dojIJAHTgQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027