UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+14F3Sldpia5YPKqnbSf48j2wgZo5v8u839AKc0es0g='
WHERE
key_id = 'c079d2dee6c984a566bd05923608dacca8e9a0f2c5d4afc32d6bac7b9cb3180b'
AND (
token = '+14F3Sldpia5YPKqnbSf48j2wgZo5v8u839AKc0es0g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)