UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zu86gLFBXBK6TCGG2l/F2VgOXOLsI5XdyPXXJLZ1PaY='
WHERE
key_id = 'fa01ed0a45391e01d16384d3d207cd181a254597d75e9d02235702f70b05d908'
AND (
token = 'Zu86gLFBXBK6TCGG2l/F2VgOXOLsI5XdyPXXJLZ1PaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)