UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Z1K5V8/xMMD3tSt/xIwxH6tkpVR7yy1+MtlP5bpGqc='
WHERE
key_id = 'e143219996524df47095b6569d76449862006ee5fc197b2fa10a626e5c4c0a53'
AND (
token = '2Z1K5V8/xMMD3tSt/xIwxH6tkpVR7yy1+MtlP5bpGqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)