UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RGO1FwApp7oF5U/mNIOlp01CYL2su5b+46i9GIoYf3I='
WHERE
key_id = '2b05e9d86933a28b2db4daeac479c9bc910b060cb4a0a22e7a0ca2e79bad0368'
AND (
token = 'RGO1FwApp7oF5U/mNIOlp01CYL2su5b+46i9GIoYf3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)