UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/MZ2uAkrGLTh0hxvoz1sqf0gcA4E8ViKiY88hF0S1SU='
WHERE
key_id = '6c3c4d3034fc2d54b7f55e0fed886bdb13fdf18ddaf267a7724923ffc775fc8c'
AND (
token = '/MZ2uAkrGLTh0hxvoz1sqf0gcA4E8ViKiY88hF0S1SU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)