UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yrIKaBVEq1N4Rsxm7XG4LX3Fa7bjVLCwzLM9b2JVaEM='
WHERE
key_id = 'bebbde6c037b6e0dc83bb4a9a20a57d5c7df262d9353cbe8bc3265ccf1b39a47'
AND (
token = 'yrIKaBVEq1N4Rsxm7XG4LX3Fa7bjVLCwzLM9b2JVaEM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)