UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mZ87Nev411e27mvks6oh4fn5CC/znnuU7WB6dmqRw5s='
WHERE
key_id = '19483394e986b45d52689e593aff19db573f6c848bcf3bc5c2883d77e37eba74'
AND (
token = 'mZ87Nev411e27mvks6oh4fn5CC/znnuU7WB6dmqRw5s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)