UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wxII57mb16+PHEm/G5MPbzBx6Kd5uO2vt/cIVN3HXzk='
WHERE
key_id = 'a72c6193c222f66eac74caedab69d9d1a4132b7ce1a4277861cb3ea1ec8bf41a'
AND (
token = 'wxII57mb16+PHEm/G5MPbzBx6Kd5uO2vt/cIVN3HXzk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)