UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rqlqIi/WBDA8/sGyhVJKS2zRFA1k6ltTUki0aauke/Q='
WHERE
key_id = '441627d24fada047ec3112afb009bf32982d33dbc11d3a0921b00e65458a147f'
AND (
token = 'rqlqIi/WBDA8/sGyhVJKS2zRFA1k6ltTUki0aauke/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)