UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fmA01zyQpaGOs1/Z5Xg01KdlMHqAOHJtwv/EYxs9lPE='
WHERE
key_id = '63371440003287591a220fe0cf95c9ffee744583702f84cbb0d47e1e59294700'
AND (
token = 'fmA01zyQpaGOs1/Z5Xg01KdlMHqAOHJtwv/EYxs9lPE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)