UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PRX4H1++9c4KybHwUiLMDhoIY7WUW7mdyF+jqOk3I1E=' 
WHERE 
  key_id = '09de09962b4e25b881f3c6babf1acbcd6a92a3dff1c8fcf098efec1ae27833f0' 
  AND (
    token = 'PRX4H1++9c4KybHwUiLMDhoIY7WUW7mdyF+jqOk3I1E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033