UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oVFvVniihf19MOy9pOKZjfLvCWdZov4MPufh+ldTMAM='
WHERE
key_id = '706e5ed0e56e20b7408ecd39a15fa13242b3463fde331b709ff922277d62db93'
AND (
token = 'oVFvVniihf19MOy9pOKZjfLvCWdZov4MPufh+ldTMAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)