UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3bLDtlGBSKAKe9pV37eJ5ov1JwGFfc6IScKLZqrdUcI='
WHERE
key_id = '4d3f538e2c95a088f8bb2fdf1300c3365b2f2271a0de7a4e287c851146951aca'
AND (
token = '3bLDtlGBSKAKe9pV37eJ5ov1JwGFfc6IScKLZqrdUcI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)