UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lM1QdVJ/4BMjJDbdnWL+j3vCy+o6pWL/cK5rp8hccaU='
WHERE
key_id = 'b32a365d6ba756555cd8c3d227aa61e880176c37e5881784f1cc52c7ac7340aa'
AND (
token = 'lM1QdVJ/4BMjJDbdnWL+j3vCy+o6pWL/cK5rp8hccaU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)