UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZlZux6B4EfoxeqzrxsqQJRtGr/HZ3IPIHgqWeZJ7k7M='
WHERE
key_id = '5c3c1cf1cc89a251771c5ac839cae50e35814b68ced815c3ca558011c3dea3f5'
AND (
token = 'ZlZux6B4EfoxeqzrxsqQJRtGr/HZ3IPIHgqWeZJ7k7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)