UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7CBknRm80RxCbBz49WB6XVVGOvsKN50rfCgAsIEpfec='
WHERE
key_id = '80de32e75fdefe3e50f76029173f2e28f7e8ac9acae7c7735f9e92a7e611f3c7'
AND (
token = '7CBknRm80RxCbBz49WB6XVVGOvsKN50rfCgAsIEpfec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)