UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZIZvL+Q+G4PPi4PJ6IKH2zNKv2Y02vQKpf3scqah9ao='
WHERE
key_id = '0b3359452698db04f65d398af66642a2dd9b023d94fba6f2f665080b7790d2bd'
AND (
token = 'ZIZvL+Q+G4PPi4PJ6IKH2zNKv2Y02vQKpf3scqah9ao='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)