UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'veBpr9NdCx9FR8R8U+mRET/0htyuZY2DzJ54EHZxclc='
WHERE
key_id = '8feeefbf75efc0509dc7fb0f889ce0bb74ae32a19ecd2a342f7ba8f41a2a9364'
AND (
token = 'veBpr9NdCx9FR8R8U+mRET/0htyuZY2DzJ54EHZxclc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)