UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0bnIrnMZF/zVugHQO8Z6FIZjNQNGGCl7LmgT+TRfQrM=' 
WHERE 
  key_id = '4e904ec1585b7c292ada699d5c99fdf4294f6cf3b5f5d743a67fafa695606ee9' 
  AND (
    token = '0bnIrnMZF/zVugHQO8Z6FIZjNQNGGCl7LmgT+TRfQrM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016