UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GI6q4Ix/VGCX1oiP70ym+kgXgfMGcXKUU4LWDlagqxQ='
WHERE
key_id = 'fcbb997342679ce5b0a613808ca68d67bc98ded9c6ec838b4f02b72ef354a9f1'
AND (
token = 'GI6q4Ix/VGCX1oiP70ym+kgXgfMGcXKUU4LWDlagqxQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)