UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hr4mrGMqqMghDjFHB/qFTITuVsJDzZFWzsUOjpnuKHg='
WHERE
key_id = '53a97b7aa4131640dcfd9ac6408b69c7e42828115245f31c6f1ff4cbcffe96e6'
AND (
token = 'Hr4mrGMqqMghDjFHB/qFTITuVsJDzZFWzsUOjpnuKHg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)