UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vtbs5R3hlwQr6cEp/wQPvY2Nxld4qwaDABqMV2EVRrI='
WHERE
key_id = '4b28ed3909099e724503fbd1e7b26c1a85a6417a5225fef25778c38e2658ba77'
AND (
token = 'Vtbs5R3hlwQr6cEp/wQPvY2Nxld4qwaDABqMV2EVRrI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)