UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IkD+AYtc+FpzO2/Ie4Qr5ShVTgr78pJpBM1Ak5SAyWE='
WHERE
key_id = '3faab1a168f1c20e808c45b10ea4f948fb511e3d3cfbd6bffc7380c4fa4d4e22'
AND (
token = 'IkD+AYtc+FpzO2/Ie4Qr5ShVTgr78pJpBM1Ak5SAyWE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)