UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HVbQgVMSOz89aRxONK/C2jvI8jL14mlE+WH1qSVI15s='
WHERE
key_id = '3dbcaeaf6987d2ac99df11029be7a719a1ca0177805293ff3c5fd0c03f1b78a2'
AND (
token = 'HVbQgVMSOz89aRxONK/C2jvI8jL14mlE+WH1qSVI15s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)