UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GPNuqxS/uUffVt+/WIEfga7Q926N4kR0vpA9gV6GLaQ='
WHERE
key_id = '9369db9ec93a87c6ad7282bdf787b752825858c2cf3d70210e7657a61b834a37'
AND (
token = 'GPNuqxS/uUffVt+/WIEfga7Q926N4kR0vpA9gV6GLaQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)