UPDATE cscart_lock_keys SET expiry_at = UNIX_TIMESTAMP(NOW()) + 30, token = 'Bv6YjpANnElcriwP4FyQGGUflDROpDR1JffIRoehrE4=' WHERE key_id = 'd3229eaa43363db208626fa0074a4eaa5f8750afca70b258eb67e8c114cbe3fb' AND (token = 'Bv6YjpANnElcriwP4FyQGGUflDROpDR1JffIRoehrE4=' OR expiry_at <= UNIX_TIMESTAMP(NOW()))