UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E5H/SqPPuLj/RYFk9i8ITTZj/jPZF5lY7Lf0koGZEJU='
WHERE
key_id = '48f95930b29fccd5d5a782a2cfd0fcd0f9924e68d88864a8515470ab79f5a698'
AND (
token = 'E5H/SqPPuLj/RYFk9i8ITTZj/jPZF5lY7Lf0koGZEJU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)