UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ET0oTnqgYG2vB3ZMP3tyo0MOXTz6e5ld+V35yxMhXWA='
WHERE
key_id = 'eddc7881305d9c47a50e61d12aee37c1d75a6bc923cf3758ca0ae3d008015251'
AND (
token = 'ET0oTnqgYG2vB3ZMP3tyo0MOXTz6e5ld+V35yxMhXWA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)